/*
 * KKPostMethod.h
 *
 *  Created on: 2013-9-9
 *      Author: wh
 */

#ifndef KKPOSTMETHOD_H_
#define KKPOSTMETHOD_H_

#include "kaka_common.h"

typedef enum {
	KKPOSTSTATE_ERROR = 0, KKPOSTSTATE_SUCCESS = 1
} KKPostState;

class KKPostMethodListener {
public:
	KKPostMethodListener() {
	}
	virtual ~KKPostMethodListener() {
	}
	virtual void onPostMethodCallBack(KKPostState state, const char* tag,
			std::string result) {
	}
};

class KKPostMethod: public cocos2d::CCObject {

private:
	;CC_SYNTHESIZE(KKPostMethodListener*,m_postMethodListener,PostMethodListener)
protected:
	KKPostMethod();

public:
	CREATE_FUNC( KKPostMethod)
	;
	virtual ~KKPostMethod();

	virtual bool init();

	void initData(const char* url, const char* tag);

	void onHttpRequestCompleted(cocos2d::extension::CCHttpClient *sender,
			cocos2d::extension::CCHttpResponse *response);
};

#endif /* KKPOSTMETHOD_H_ */
